package com.zt.entity;

import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Result {
    private Integer code; // 状态码
    private String message; // 提示信息
    private Object data; // 数据

    public static Result success(String message,Object data){
        return new Result(200,message,data);
    }

    public static Result success(String message){
        return new Result(200,message,null);
    }

    public static Result error(String message){
        return new Result(500,message,null);
    }
}
